<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>跟随鼠标移动的DIV</title>
    <style>
        div{width:100px;
        height:100px;
        background:red;
        }
    </style>
</head>
<body>
<div id="div1"></div>
<script>
    window.onload = function(){
        var oDiv = document.getElementById("div1");
        var i =0;
        document.onmousemove = function(){
            document.title = i++;
        }
    }
</script>

</body>
</html>